package cn.yq.aio.utils;

import android.content.Context;
import android.location.LocationManager;

import cn.yq.aio.base.MyApp;

public class SystemUtils {

    public static boolean isGpsEnable() {
        LocationManager locationManager = (LocationManager) MyApp.getInstance()
                .getSystemService(Context.LOCATION_SERVICE);
        boolean gps = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
        boolean network = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
        if (gps || network) {
            return true;
        }
        return false;
    }

}
